home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / QuickTime / QuickTime VR / Make QTVR Panorama / CBeachBall.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.2 KB  |  65 lines  |  [TEXT/CWIE]

  1. /*
  2.     Implements an interrupt time spinning cursor
  3.  
  4.     Created 29 Jan 1996 by EGH
  5.     
  6.     Copyright © 1996, Apple Computer, Inc. All rights reserved.
  7. */
  8.  
  9. #pragma once
  10.  
  11. #include <Retrace.h>
  12.  
  13. #pragma options align=mac68k
  14.  
  15. struct Acur
  16. {
  17.     short n;        // Number of cursors ("frames of film")
  18.     short index;    //  Next frame to show <for internal use>
  19.     short frame1;    // 'CURS' resource id for frame #1
  20.     short fill1;    // <for internal use>
  21.     short frame2;    // 'CURS' resource id for frame #2
  22.     short fill2;    // <for internal use>
  23.     short frameN;    // 'CURS' resource id for frame #N
  24.     short fillN;    // <for internal use>
  25. };
  26. typedef struct Acur acur,*acurPtr,**acurHandle;
  27.  
  28. typedef struct
  29. {
  30.     VBLTask task;
  31.     long a5;
  32. } VBLTaskNA5;
  33.  
  34. #pragma options align=reset
  35.  
  36. class CBeachBall
  37. {
  38. public:
  39.  
  40.     static void InitBeachBall();
  41.     
  42.     static void SpinBeachBall();
  43.     
  44.     static void StartSpinningTask(
  45.         short inCount);
  46.     static void StopSpinningTask();
  47. #ifdef powerc
  48.     static void SpinTask(
  49.         VBLTaskNA5 *inTask);
  50. #else
  51.     static void SpinTask(
  52.         VBLTaskNA5 *inTask : __D0);
  53. #endif
  54.     
  55. private:
  56.  
  57.     static short sNumBBCur;
  58.     static Cursor *sBBCursors;
  59.     static short sCurBB;
  60.     static UInt32 sSpinTime;
  61.     static short sSpinCount;
  62.     static VBLTaskNA5 *sSpinTask;
  63. };
  64.  
  65.